<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	
	<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/workspace.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	
	<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
	<script type="text/javascript" src="js/admin_public.js?v={yun:}$config.cachecode{/yun}"></script>
	<script type="text/javascript" src="js/crm.js?v={yun:}$config.cachecode{/yun}"></script>
	<script type="text/javascript" src="js/show_pub.js?v={yun:}$config.cachecode{/yun}"></script>
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
	
	<title>后台管理</title>
	
	<style>
		.admin_new_c_bth{
			width:50px !important;
		}
	</style>
	
</head>

<body class="body_ifm">
	<div class="infoboxp">
	
 		
 		
		<div class="tabs_info">
           	<ul>
               	<li class='curr'><a href="index.php?m=crm_salesman_list&c=customer_list&auid={yun:}$adminUserInfo.uid{/yun}">客户信息</a></li>
           	</ul>
       	</div>
       	
	  	<div class="clear"></div>
	  	
	  	<div class="admin_new_tip">
			<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
			<div class="admin_new_tip_list_cont">
				<div class="admin_new_tip_list">该页面展示了业务员【{yun:}$adminUserInfo.name{/yun}】客户列表信息。</div>
			</div>
		</div>
    
		<div class="clear"></div>
	  	
	    
           <!--  搜索-->
       	<form action="index.php" name="myform"  method="get" class='layui-form'>
       	
       		<input type="hidden" name="m" value="crm_salesman_list" />
       		<input type="hidden" name="c" value="customer_list" />
       		
       		{yun:}if $smarty.get.auid{/yun}
				<input type="hidden" name="auid" value="{yun:}$smarty.get.auid{/yun}" />
			{yun:}/if{/yun}
			
			<div class="crm_search">
				<table class="crm_search_table"> 
					<tr>         
						<td width="55">客户等级</td>
						<td>
							<div class="crm_search_select" >
								<div class="layui-input-inline">
									<select name="crmType" id="crmType" lay-verify="">
										<option value="">请选择</option> 
  										{yun:}foreach from = $crmType item=type{/yun}
											<option value="{yun:}$type{/yun}" {yun:}if $smarty.get.crmType==$type{/yun}selected{yun:}/if{/yun} >{yun:}$crmClassName[$type]{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div>  
						</td>
						
						<td width="55">客户状态</td>
						<td>
							<div class="crm_search_select" >
								<div class="layui-input-inline">
									<select name="crm_status" id="crm_status" lay-verify="">
										<option value="">请选择</option> 
  										{yun:}foreach from = $crmStatus item=cStatus{/yun}
											<option value="{yun:}$cStatus{/yun}" {yun:}if $smarty.get.crm_status==$cStatus{/yun}selected{yun:}/if{/yun} >{yun:}$crmClassName[$cStatus]{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div>  
						</td>
						
						<td width="55">认证状态</td>
						<td>
							<div class="crm_search_select" >
								<div class="layui-input-inline">
									<select name="yyzz_status" id="yyzz_status" lay-verify="">
										<option value="">请选择</option> 
										{yun:}foreach from = $yyzzStatus key=key item = yyzz{/yun}
											<option value="{yun:}$key{/yun}" {yun:}if $smarty.get.yyzz_status==$key{/yun}selected{yun:}/if{/yun}>{yun:}$yyzz{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div>  
						</td>
						
						<td width="55">套餐类型</td>
						<td>
							<div class="crm_search_select" >
								<div class="layui-input-inline">
									<select name="rating" id="rating" lay-verify="">
										<option value="">请选择</option> 
										{yun:}foreach from = $ratingArr item = rating{/yun}
											<option value="{yun:}$rating.id{/yun}" {yun:}if $smarty.get.rating==$rating.id{/yun}selected{yun:}/if{/yun}>{yun:}$rating.name{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div> 
						</td>
						
						<td>
							<span class="crm_search_n">注册</span>
							<div class="crm_search_datetext">
								<input type="text" name="regStart" id="regStart" readonly size="20" placeholder="请选择起始日期" />
							</div>
							
							<span class="crm_search_z">至</span>
							<div class="crm_search_datetext">
								<input type="text" name="regEnd" id="regEnd" readonly size="20" placeholder="请选择结束日期" />
							</div>
						</td>
					</tr>
					
					<tr>         
						
						<td>排序</td>
						<td>
							<div class="crm_search_select">
								<div class="layui-input-inline">
									<select name="ordertype" id="ordertype" lay-verify="">
										<option value="" >请选择</option>
										{yun:}foreach from = $orders key=key item = order{/yun}
											<option value="{yun:}$key{/yun}" {yun:}if $smarty.get.ordertype==$key{/yun}selected{yun:}/if{/yun}>{yun:}$order{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div>
						</td>
						
						<td>上次跟进</td>
						<td>
							<div class="crm_search_select">
								<div class="layui-input-inline">
									<select name="lastFtime" id="lastFtime" lay-verify="">
										<option value="">请选择</option> 
										{yun:}foreach from = $lastFtime key=key item = lftime{/yun}
											<option value="{yun:}$key{/yun}" {yun:}if $smarty.get.lastFtime==$key{/yun}selected{yun:}/if{/yun}>{yun:}$lftime{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div>
						</td>
						<td>下次跟进</td>
						<td>
							<div class="crm_search_select">
								<div class="layui-input-inline">
									<select name="nextFtime" id="nextFtime" lay-verify="">
										<option value="">请选择</option> 
										{yun:}foreach from = $nextFtime key=key item = nftime{/yun}
											<option value="{yun:}$key{/yun}" {yun:}if $smarty.get.nextFtime==$key{/yun}selected{yun:}/if{/yun}>{yun:}$nftime{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div>
						</td>
						
						<td>套餐到期</td>
						<td>
							<div class="crm_search_select" >
								<div class="layui-input-inline">
									<select name="vipetime" id="vipetime" lay-verify="">
										<option value="">请选择</option> 
										{yun:}foreach from = $vipEtime key=key item = etime{/yun}
											<option value="{yun:}$key{/yun}" {yun:}if $smarty.get.vipetime==$key{/yun}selected{yun:}/if{/yun}>{yun:}$etime{/yun}</option>
										{yun:}/foreach{/yun}
									</select>
								</div>
							</div> 
						</td>
						
						<td>
							<div class="crm_search_box">
								<div class="crm_search_box_search formselect" did="crm_type_n">
									<span id='crm_type_name'>
										{yun:}if $smarty.get.crm_type==1 || $smarty.get.crm_type==''{/yun}公司名
										{yun:}else if $smarty.get.crm_type == 2{/yun}联系人
										{yun:}else if $smarty.get.crm_type == 3{/yun}电话
										{yun:}else if $smarty.get.crm_type == 4{/yun}UID
										{yun:}/if{/yun}
									</span>
									<div class="crm_search_list" style="display:none;"  id="crm_type_n"> 
										<a href="javascript:void(0);" onclick="keySelect('1', 'crm_type', '公司名');">公司名</a>
										<a href="javascript:void(0);" onclick="keySelect('2', 'crm_type','联系人');">联系人</a>
										<a href="javascript:void(0);" onclick="keySelect('3', 'crm_type', '电话');">电话</a>
										<a href="javascript:void(0);" onclick="keySelect('4', 'crm_type', 'UID');">UID</a>
									</div>
								</div>
								<input type="hidden" id="crm_type" name="crm_type" value="{yun:}if $smarty.get.crm_type{/yun}{yun:}$smarty.get.crm_type{/yun}{yun:}else{/yun}1{yun:}/if{/yun}">
								<input type="hidden" id="order" name="order" value="desc">
								<div class="crm_search_text" style="width:150px;"><input name="keyword" type="text" value=""></div>
								<input type="submit" value="搜索" class="crm_search_bth">
								<button type="reset"  class="crm_search_bth">重置</button>
							</div>
						</td>
					</tr>
				
				</table>  
			</div>
        </form>
        
		
		
		<div class="table-list" style="color:#898989; margin-top:10px;">
			
			<div class="admin_table_border">
			
				<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
				<form action="index.php" name="myform" method="get" id='myform' target="supportiframe">
					
					<input type="hidden" name="pytoken"  id='pytoken' value="{yun:}$pytoken{/yun}">
					<input name="m" value="crm_customer" type="hidden"/>
					<input name="c" value="del" type="hidden"/>
					
					<table width="100%">
						<thead>
							<tr class="admin_table_top">
								<th style="width:20px;">
									<label for="chkall">
										<input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)'/>
									</label>
								</th>
								<th> 
									{yun:}if $smarty.get.t=="uid" && $smarty.get.order=="asc"{/yun} 
										<a href="{yun:}searchurl order=desc t=uid m=crm_customer untype='order,t'{/yun}">客户ID<img src="images/sanj.jpg"/></a>
									{yun:}else{/yun} 
										<a href="{yun:}searchurl order=asc t=uid m=crm_customer untype='order,t'{/yun}">客户ID<img src="images/sanj2.jpg"/></a> 
									{yun:}/if{/yun} 
								</th>
	
								<th align="center">客户名称</th>
								<th align="center" width="100">会员等级</th>
								<th align="left">到期时间</th>
								<th align="center" width="100">所在城市</th>
								<th align="left" width="100">联系人</th>
								
								<th align="center">客户等级</th>
								<th align="center"width="100">客户状态</th>
								<th align="center" width="110">最后跟进时间</th>
								<th align="center" width="110">下次跟进时间</th>
 							</tr>
						</thead>
						
						<tbody>
						
							{yun:}foreach item=v key=key from=$rows{/yun}
							
								<tr align="center" {yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.uid{/yun}">
									
									<td>
										<input type="checkbox" value="{yun:}$v.uid{/yun}" class="check_all"  name='del[]' onclick='unselectall()' rel="del_chk"  style="margin-left:5px;"/>
									</td>
									
									<td align="left" class="td1" style="text-align:center;"><span>{yun:}$v.uid{/yun}</span></td>
									
									<td align="left">
									
										<div class="" style="width:150px">
											<a href="index.php?m=crm_customer&c=com&id={yun:}$v.uid{/yun}" target="_blank" class="admin_com_name">{yun:}$v.name{/yun}</a>
											{yun:}if $v.yyzz_status == 1{/yun}【证】{yun:}/if{/yun}
										</div>
										 
									</td>
	
									<td align="center">{yun:}$v.rating_name{/yun}</td>
	
									<td align="left">
									
										{yun:}if $v.vipetime > $todayEnd{/yun}
										
											{yun:}$v.vipetime|date_format:"%Y-%m-%d"{/yun}<br><font color='red'> ({yun:}$v.vipDay{/yun})</font>
											
										{yun:}else if $v.vipetime < $todayEnd && $v.vipetime != '0'{/yun}
											
											<font color='red'> {yun:}$v.vipetime|date_format:"%Y-%m-%d"{/yun} ({yun:}$v.vipDay{/yun})</font>
											
										{yun:}else{/yun}
											永久会员
										{yun:}/if{/yun}
										
										
									</td>
	
									<td align="left">{yun:}$v.job_city_one{/yun}{yun:}$v.job_city_two{/yun}{yun:}$v.job_city_three{/yun}</td>
	
									<td align="left">{yun:}$v.linkman{/yun}<br>{yun:}$v.linktel{/yun}</td>
									
									
									<td align="center">
										{yun:}if $v.crm_type{/yun}
											{yun:}$v.crm_type{/yun}
										{yun:}else{/yun}
										 	--
										{yun:}/if{/yun}
									</td>
									
									<td align="center">
										{yun:}if $v.crm_status{/yun}
											{yun:}$v.crm_status{/yun}
										{yun:}else{/yun}
										 	--
										{yun:}/if{/yun}
									</td>
								
									<td align="center">
										{yun:}if $v.lastTime{/yun}
											{yun:}$v.lastTime{/yun}<br>
										{yun:}else{/yun}
											{yun:}if $smarty.get.self{/yun}
										 		<a href='javascript:void(0);' class="CrmnewFollow" data-uid="{yun:}$v.uid{/yun}" data-name="{yun:}$v.name{/yun}">+跟进</a>
										 	{yun:}else{/yun}
										 		--
										 	{yun:}/if{/yun}
										{yun:}/if{/yun}
									</td>
									
									<td align="center">
										{yun:}if $v.nextTime{/yun}
											{yun:}$v.nextTime{/yun}<br>
										{yun:}else{/yun}
											{yun:}if $smarty.get.self{/yun}
										 		<a href='javascript:void(0);' class="CrmnewTask" data-uid="{yun:}$v.uid{/yun}" data-name="{yun:}$v.name{/yun}">+任务</a>
										 	{yun:}else{/yun}
										 		--
										 	{yun:}/if{/yun}
										{yun:}/if{/yun}
									</td>
								 
								</tr>
	
							{yun:}/foreach{/yun}
	           
							{yun:}if $total > $config.sy_listnum {/yun}
								<tr>
									{yun:}if $pagenum==1{/yun}
										<td colspan="3"> 从 1 到 {yun:}$config.sy_listnum {/yun} ，总共 {yun:}$total{/yun} 条</td>
									{yun:}else if $pagenum > 1 && $pagenum < $pages{/yun}
										<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ，总共 {yun:}$total{/yun} 条</td>
									{yun:}else if $pagenum == $pages{/yun}
										<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ，总共 {yun:}$total{/yun} 条</td>
									{yun:}/if{/yun}
									<td colspan=8" class="digg">{yun:}$pagenav{/yun}</td>
								</tr>
							{yun:}/if{/yun}
						</tbody>
					</table>
				</form>
			</div>
		</div>
	</div>

	<script>
		layui.use(['layer', 'form', 'laydate'], function(){
			var form 	= layui.form,
				laydate = layui.laydate,
				$ 		= layui.$;
			
			laydate.render({
				elem: '#regStart',
				value: '{yun:}if $smarty.get.regStart{/yun}{yun:}$smarty.get.regStart{/yun}{yun:}/if{/yun}'
			});
			laydate.render({
				elem: '#regEnd',
				value: '{yun:}if $smarty.get.regEnd{/yun}{yun:}$smarty.get.regEnd{/yun}{yun:}/if{/yun}'
			});
		});
	</script>
	
	{yun:}include file="$adminstyle/crm_public.htm"{/yun}
</body>
</html>